// import com.alibaba.druid.sql.ast.SQLExpr_ptr;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLAlterProcedureStatement.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLExpr.h"

void SQLAlterProcedureStatement::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLAlterProcedureStatement)))
  {
    acceptChild(visitor, name);
  }
  visitor->endVisit(SharedObject(SQLAlterProcedureStatement));
}

SQLExpr_ptr SQLAlterProcedureStatement::getName()
{
  return name;
}

void SQLAlterProcedureStatement::setName(SQLExpr_ptr name)
{
  this->name = name;
}

BOOL_ptr SQLAlterProcedureStatement::isCompile()
{
  return compile;
}

void SQLAlterProcedureStatement::setCompile(BOOL_ptr compile)
{
  this->compile = compile;
}

BOOL_ptr SQLAlterProcedureStatement::isReuseSettings()
{
  return reuseSettings;
}

void SQLAlterProcedureStatement::setReuseSettings(BOOL_ptr reuseSettings)
{
  this->reuseSettings = reuseSettings;
}

BOOL_ptr SQLAlterProcedureStatement::isLanguageSql()
{
  return languageSql;
}

void SQLAlterProcedureStatement::setLanguageSql(BOOL_ptr languageSql)
{
  this->languageSql = languageSql;
}

BOOL_ptr SQLAlterProcedureStatement::isContainsSql()
{
  return containsSql;
}

void SQLAlterProcedureStatement::setContainsSql(BOOL_ptr containsSql)
{
  this->containsSql = containsSql;
}

SQLExpr_ptr SQLAlterProcedureStatement::getSqlSecurity()
{
  return sqlSecurity;
}

void SQLAlterProcedureStatement::setSqlSecurity(SQLExpr_ptr sqlSecurity)
{
  if (sqlSecurity != nullptr)
  {
    sqlSecurity->setParent(SharedObject(SQLAlterProcedureStatement));
  }
  this->sqlSecurity = sqlSecurity;
}

SQLExpr_ptr SQLAlterProcedureStatement::getComment()
{
  return comment;
}

void SQLAlterProcedureStatement::setComment(SQLExpr_ptr comment)
{
  if (comment != nullptr)
  {
    comment->setParent(SharedObject(SQLAlterProcedureStatement));
  }
  this->comment = comment;
}

// @Override
SQLDDLStatement::DDLObjectType SQLAlterProcedureStatement::getDDLObjectType()
{
  return SQLDDLStatement::DDLObjectType::PROCEDURE;
}
